package org.tso.bs.server;

import org.tso.bs.server.handler.Handler;
import org.tso.bs.server.handler.SessionHandler;
import org.tso.bs.server.handler.RegHandler;

public class HandlerFactory {

	public Handler createHandler(Head head) {
		String name = head.getHandlerName();
		if ("REG".equals(name)) {
			return new RegHandler(head);
		} else if ("LGN".equals(name)) {
			return new SessionHandler(head);
		}
		return null;
	}

}
